package com.github.baichuan.application.scaffold.dto.app;

import com.github.baichuan.application.scaffold.domain.app.App;
import com.github.baichuan.mapping.Mapping;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Getter;

@Schema(title = "APP程序")
@Getter
public class AppForm {
    @Schema(title = "APP名称")
    @NotBlank(message = "APP名称不能为空")
    @Size(max = 32, message = "APP名称最多32个字符")
    @Mapping
    private String name;

    @Schema(title = "APP编码")
    @NotBlank(message = "APP编码不能为空")
    @Size(max = 32, message = "APP编码最多32个字符")
    @Mapping
    private String code;

    @Schema(title = "操作系统")
    @NotNull(message = "操作系统不能为空")
    @Mapping
    private App.Platform platform;
}
